#include "Event.h"
#include "..\..\SGD Wrappers\SGD_GraphicsManager.h"


Event::Event()
{

}


Event::~Event()
{

}

int Event::Update(float dt)
{
	return 0;
}

void Event::Render()
{
	if (bTriggered == true)
	{
		SGD::GraphicsManager::GetInstance()->DrawString("Event Triggered!", GetPosition(), SGD::Color{ 0, 250, 250 });
	}
}

void Event::HandleCollision(const GameObject* collision)
{
	SGD::Rectangle currentRect = GetRect();
	SGD::Rectangle collisionRect = collision->GetRect();

	if (currentRect.IsIntersecting(collisionRect))
	{
		bTriggered = true;
	}
}
